package com.cyzy.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cyzy.domain.TGoods;
import com.cyzy.service.TGoodsService;
import com.cyzy.mapper.TGoodsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 10204
 * @description 针对表【t_goods(商品表，用于存储商品的详细信息)】的数据库操作Service实现
 * @createDate 2024-11-18 11:28:37
 */
@Service
public class TGoodsServiceImpl extends ServiceImpl<TGoodsMapper, TGoods> implements TGoodsService {
    @Autowired
    private TGoodsMapper tGoodsMapper;

    //批量添加商品
    //我是大帅哥
    @Override
    public int insertGoods(List<TGoods> goodsList) {
        return tGoodsMapper.insertGoods(goodsList);
    }

    //批量下架商品
    //我是大帅哥
    @Override
    public int updateState(List<TGoods> goodsList) {
        return tGoodsMapper.updateState(goodsList);
    }

    //修改商品信息
    //我是大帅哥
    @Override
    public int updateGoods(TGoods goods) {
        return tGoodsMapper.updateGoods(goods);
    }
}




